package kuang;

/**
 * @author cyt
 * @create 2020-03-07 11:41
 */
public class Testjoin implements Runnable {

    @Override
    public void run() {
        String name = Thread.currentThread().getName();
        System.out.println(name);
        for (int i = 0; i < 6; i++) {
            System.out.println("VIP" + i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(new Testjoin());
        thread.start();
        for (int i = 0; i < 10; i++) {
            if (i == 5) {
                thread.join();
            }
            System.out.println("main" + i);
        }
    }
}
